import Vue from 'vue'
import VueRouter from 'vue-router'
import { Button } from 'vant';
Vue.use(VueRouter)
Vue.use(Button)
const routes = [
  {
    path: '/',
    // name: 'index',
    component: () => import('../views/index.vue'),
    children:[{
      path:'/',
      name:'/Recommend',
      component:()=>import('@/views/index/Recommend.vue')
    },{
      path:'/Hot',
      name:'/Hot',
      component:()=>import('@/views/index/Hot.vue')
    },{
      path:'/search',
      name:'/Search',
      component:()=>import('@/views/index/Search.vue')
    }],
  },{
    path:'/play',
    name:'/play',
    component:()=>import('@/views/play.vue')
  },{
    path:'/playlist',
    name:'/playlist',
    component:()=>import('@/views/playlist.vue')
  }
]

const router = new VueRouter({
  mode:"history",
  routes,
  "linkExactActiveClass":"active"
})

export default router
